﻿using KNet.Data.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CNKI.TPI.Web.Search.Model
{
    public class SYS_CMS_PUBLISHTYPE : BaseModel, ITable
    {
        public SYS_CMS_PUBLISHTYPE()
        {
 
        }

        public SYS_CMS_PUBLISHTYPE(string name)
        {
            this.Name = name;
            this.DatabaseList = new List<SYS_CMS_DATABASE>();
            switch(name)
            {
                case "视频库":
                    SysID = 4;
                    break;
                case "图片库":
                    SysID = 5;
                    break;
                case "音频库":
                    SysID = 6;
                    break;
                default:
                    SysID = 0;
                    break;
            }
        }

        public int SysID { set; get; }
        public string Name { set; get; }
        public string Code { set; get; }
        public string Descript { set; get; }
        public IList<SYS_CMS_DATABASE> DatabaseList { set; get; }
        public override object Clone()
        {
            SYS_CMS_PUBLISHTYPE entity = (SYS_CMS_PUBLISHTYPE)this.MemberwiseClone();
            entity.DatabaseList = new List<SYS_CMS_DATABASE>();
            return entity; //浅复制
        }
    }
}
